package lxzh.dao;

 
import javax.annotation.Resource;

import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import lxzh.vo.UserVO;

@Repository
public class UserDao {

	@Resource
	private JdbcTemplate jdbcTemplate;

	public UserVO findByName(String username) {
		String querySQL = "select *from wds.rtsq where sendid=1039 order by time desc";
		RowMapper<UserVO> rowMapper = new BeanPropertyRowMapper<>(UserVO.class);
		UserVO vo = jdbcTemplate.queryForObject(querySQL, new Object[] { username }, rowMapper);
		return vo;
	}
}